package com.dao;

import java.util.List;
import java.util.Map;
import java.util.Set;

import org.springframework.stereotype.Repository;

import com.entity.Role;
import com.entity.User;

@Repository
public interface UserDao {
	//查询
	public User findByUserName(String username);
	//查询存储过程的方法
	public void callProcedure(Map<String,Object> map);
	//查询函数的方法
	public void callFunction(Map<String,Object> map);
	//查询存储过程的方法+懒加载
	public List<User> callProcedureList(Map<String,Object> map);
	//懒加载
	public User getByUserNameAndLazy(String username);
	
	public Set<Role> getByUserId(Integer uid);
	public List<User> getAll();
	public User getById(Integer id);
	public void updateById(User user);
	public void delById(Integer id);
	public void add(User user);
	public User login(String name);

}